var User = require('../models/user.js')

var user1 = new User({
        id:7877979122917291,
        nickName:'爱吃小黄豆',
        password:'coco1234',
        bind:'18680306621',
        headImage:'http://7u2l4r.com1.z0.glb.clouddn.com/cefc1e178a82b90140970035708da9773912effa.jpg',
        type:1
    }
);

//user1.save(function(err) {
//    if(err) {
//        console.log('save error');
//    } else {
//        console.log('save success');
//    }
//})

//User.find({"bind":"18680306621", "password":"coco1234"}, function(error, result) {
//    console.log(result);
//});

//User.find({"password":{"$in":[12,32,"coco1234"]}}, function(err, results) {
//    console.log(results);
//})

//User.find({"$or":[{"nickName":"爱吃小黄豆1"}, {"password":{"$in":[12,32,"coco1234"]}}]}, function(err, results){
//    console.log(results);
//})

/*
* Model.find(query,field,options, callback);
* */